import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/components/Login'
import Home from '@/components/Home'

import Introduce from '@/components/System/Introduce'
import User from '@/components/System/User'
import Role from '@/components/System/Role'
import Menu from '@/components/System/Menu'

import Button from '@/components/System/Menu/Button'
import Folder from '@/components/System/Menu/Folder'
import MenuDetail from '@/components/System/Menu/MenuDetail'





Vue.use(Router)


export default new Router({
  routes: [
    {
      path: '/',
      name: 'Login',
      component: Login
    },
    {
      path: '/home',
      name: 'Home',
      component: Home,
      children:[
        {path: '/introduce',
          name: 'Introduce',
          component: Introduce
        },
        {path: '/sys/menu',
          name: 'Menu',
          component: Menu,
          props:true,
          children:[
            {path: '/menu/button',
              name: 'Button',
              component: Button,
              props:true
            },
            {path: '/menu/folder',
              name: 'Folder',
              component: Folder,
              props:true
            },
            {path: '/menu/menuDetail',
              name: 'MenuDetail',
              component: MenuDetail,
              props:true
            }
          ]
        },
        {path: '/sys/role',
          name: 'Role',
          component: Role
        },
        {path: '/sys/user',
          name: 'User',
          component: User
        },
      ]
    }

  ],
  "mode":"history"

})
